<template>
	<div class="app-container">
		<div>
			<p class="dialogTitle title">当前地震事件:
				<span v-if="currentEvent">{{ currentEvent.eventName }}</span>
				<span v-else>请在地震事件管理中设置当前地震事件</span>
			</p>
		</div>
		<el-row>
			<el-col :span="8">
				<div style="font-size: 16px;font-weight: bold;">&nbsp;&nbsp;1）确定房屋装修费用与主体造价的比值</div>
			</el-col>
		</el-row>
		<el-row :gutter="10" class="mb8" style="margin-top: 10px;">
			<!--<el-col :span="1.5">
          <el-button type="primary"  @click="handleUpdate">修改</el-button>
      </el-col>-->
			<el-col :span="8">
				<div>（计算值默认中值，可以修改，修改值必须在对应的范围内）</div>
			</el-col>
			<el-col :span="4">
				<div>房屋装修费用与主体造价的比值</div>
			</el-col>
			<el-col :span="4">
				<div>用百分比（%）表示</div>
			</el-col>
		</el-row>
		<el-row style="margin-top: 20px;">
			<el-col :span="10">
				<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
					<el-form-item>
						<el-button type="primary" @click="handleUpdate">修改</el-button>
					</el-form-item>
				</el-form>
			</el-col>
		</el-row>
		<el-row style="margin-top: 20px;">
			<el-col :span="16">
				<el-form ref="formRef" :model="form" :rules="rules" label-width="0px">
					<table align="center" style="width: 100%;border-collapse: collapse;">
						<tr style="background: #D9D9D9;height: 35px;">
							<td align="center" :rowspan="2" style="width: 150px;">请选择</td>
							<td align="center" :rowspan="2" :colspan="2" style="width: 200px;">城市规模</td>
							<td align="center" :colspan="2">房屋类型</td>
						</tr>
						<tr style="background: #D9D9D9;height: 35px;">
							<td align="center" style="width: 200px;">钢筋混凝土房屋</td>
							<td align="center" style="width: 200px;">砌体房屋</td>
						</tr>
						<tr>
							<td align="center" :rowspan="3">
								<el-radio v-model="form.ratioType" label="0" @change="handleCheckedCitiesChange"><span></span></el-radio>
							</td>
							<td align="center" :rowspan="3">大城市</td>
							<td align="center" style="height: 35px;">范围</td>
							<td align="center">26~48</td>
							<td align="center">20~34</td>
						</tr>
						<tr>
							<td align="center" style="height: 35px;">中值</td>
							<td align="center">37</td>
							<td align="center">27</td>
						</tr>
						<tr>
							<td align="center">计算值</td>
							<td align="center">
								<el-form-item prop="bigCityConcreteValue">
									<el-input v-model="form.bigCityConcreteValue" :disabled="form.ratioType != '0'" />
								</el-form-item>
							</td>
							<td align="center">
								<el-form-item prop="bigCityMasonryValue">
									<el-input v-model="form.bigCityMasonryValue" :disabled="form.ratioType != '0'" />
								</el-form-item>
							</td>
						</tr>
						<tr>
							<td align="center" :rowspan="3">
								<el-radio v-model="form.ratioType" label="1" @change="handleCheckedCitiesChange"><span></span></el-radio>
							</td>
							<td align="center" :rowspan="3">中等城市</td>
							<td align="center" style="height: 35px;">范围</td>
							<td align="center">19~38</td>
							<td align="center">16~25</td>
						</tr>
						<tr>
							<td align="center" style="height: 35px;">中值</td>
							<td align="center">29</td>
							<td align="center">21</td>
						</tr>
						<tr>
							<td align="center">计算值</td>
							<td align="center">
								<el-form-item prop="mediumCityConcreteValue">
									<el-input v-model="form.mediumCityConcreteValue" :disabled="form.ratioType != '1'" />
								</el-form-item>
							</td>
							<td align="center">
								<el-form-item prop="mediumCityMasonryValue">
									<el-input v-model="form.mediumCityMasonryValue" :disabled="form.ratioType != '1'" />
								</el-form-item>
							</td>
						</tr>
						<tr>
							<td align="center" :rowspan="3">
								<el-radio v-model="form.ratioType" label="2" @change="handleCheckedCitiesChange"><span></span></el-radio>
							</td>
							<td align="center" :rowspan="3">小城市</td>
							<td align="center" style="height: 35px;">范围</td>
							<td align="center">15~30</td>
							<td align="center">10~20</td>
						</tr>
						<tr>
							<td align="center" style="height: 35px;">中值</td>
							<td align="center">23</td>
							<td align="center">15</td>
						</tr>
						<tr>
							<td align="center">计算值</td>
							<td align="center">
								<el-form-item prop="smallCityConcreteValue">
									<el-input v-model="form.smallCityConcreteValue" :disabled="form.ratioType != '2'" />
								</el-form-item>
							</td>
							<td align="center">
								<el-form-item prop="smallCityMasonryValue">
									<el-input v-model="form.smallCityMasonryValue" :disabled="form.ratioType != '2'" />
								</el-form-item>
							</td>
						</tr>
					</table>
				</el-form>
			</el-col>
		</el-row>
		<el-row style="margin-top: 20px;">
			<el-col :span="18">
				<el-row justify="space-between">
					<div style="font-size: 16px;font-weight: bold;">&nbsp;&nbsp;2）计算各个评估子区房屋装修直接经济损失</div>
					<el-col :span="3">
						<el-link type="primary" :underline="false" @click="viewFormula">查看计算公式</el-link>
					</el-col>
					<el-button type="primary" @click="handleQuery">计算</el-button>
				</el-row>
			</el-col>
		</el-row>
		<el-row style="margin-top: 10px;">
			<el-col :span="18">
				<el-table v-loading="loading" :data="dataList" :span-method="objectSpanMethod">
					<el-table-column label="评估子区" align="center" prop="xstmName" />
					<el-table-column label="结构类型" align="center" prop="structureType" />
					<el-table-column label="基本完好" align="center" prop="basicallyIntactLoss" />
					<el-table-column label="轻微破坏" align="center" prop="minorDamageLoss" />
					<el-table-column label="中等破坏" align="center" prop="moderateDamageLoss" />
					<el-table-column label="严重破坏" align="center" prop="seriousDamageLoss" />
					<el-table-column label="毁坏" align="center" prop="destroyLoss" />
					<el-table-column label="房屋损失（万元）" align="center" prop="totalLoss" />
				</el-table>
			</el-col>
		</el-row>
		<el-row style="margin-top: 20px;margin-bottom: 20px;">
			<el-col :span="18">
				<el-row justify="space-between">
					<div style="font-size: 16px;font-weight: bold;">&nbsp;&nbsp;3）计算各个评估子区和灾区房屋装修直接经济损失</div>
					<el-col :span="3">
						<el-link type="primary" :underline="false" @click="viewCorrectionFactor">查看修正系数</el-link>
					</el-col>
					<el-button type="primary" @click="summary">汇总</el-button>
				</el-row>
			</el-col>
		</el-row>
		<el-row>
			<el-col :span="18">
				<el-table v-loading="loading1" :data="dataList1" stripe>
					<el-table-column label="评估子区" align="center" prop="xstmName" />
					<el-table-column label="房屋损失（万元）" align="center" prop="totalLoss" />
				</el-table>
			</el-col>
		</el-row>
		<el-dialog title="计算公式" v-model="open" width="720px" append-to-body>
			<div style="font-size: 16px;">
				<p>城市评估区应在计算房屋经济损失基础上，增加中高档装修房屋的装修破坏直接经济损失，按下列步骤计算：</p>
				<p>&nbsp;a)按式(1)计算各评估子区各类房屋装修在某种破坏等级下的损失Ld：</p>
				<p>&nbsp;&nbsp;&nbsp;&nbsp;Ld=r1xr2xSd xRd×Dd×Pd…………………………(1)</p>
				<p>&nbsp;&nbsp;&nbsp;式中：</p>
				<p>&nbsp;&nbsp;&nbsp;Sd——该评估子区同类中高档装修房屋总建筑面积，单位为平方米；</p>
				<p>&nbsp;&nbsp;&nbsp;Rd——该评估子区同类房屋某种破坏等级的破坏比；</p>
				<p>&nbsp;&nbsp;&nbsp;Dd——该评估子区同类房屋某种破坏等级的装修破坏损失比；</p>
				<p>&nbsp;&nbsp;&nbsp;Pd——该评估子区同类房屋中高档装修的重置单价(房屋装修的重置单价主要由各类房屋的重置单价乘以装修百分比Ƞ
					(见附录A中表A2)得到：Pd=Ph×Ƞ)，单位为元每平方米；用户先选择城市规模，系统根据城市规模，显示装修百分比Ƞ中值，用户可以根据表A2中的值修改，修改的值在A2表对应的范围内。</p>
				<p>&nbsp;&nbsp;&nbsp;r1——考虑各个地区经济状况差异的修正系数（装修费用应随地区经济发达水平而有所提高，可采用附录A中表A3规定的修正系数r1予以修正）；</p>
				<p>&nbsp;&nbsp;&nbsp;r2——考虑不同用途的修正系数（若按照用途分类评估房屋破坏的直接经济损失，房屋装修费用因其用途不同而有所差异，可采用附录A中表A4规定的修正系数r2予以修正，否则取1.0）；</p>
				<p>&nbsp;b) 将所有破坏等级的房屋装修损失相加，得到该评估子区该类房屋装修破坏的损失；</p>
				<p>&nbsp;c) 将所有类别的装修损失相加，得到该评估子区房屋装修破坏损失；</p>
				<p>&nbsp;d) 将所有评估子区的房屋装修损失相加，然后乘以修正系数r1、r2，得出整个灾区的房屋装修破坏损失。</p>
			</div>
			<template #footer>
				<div class="dialog-footer">
					<el-button @click="open = false">关 闭</el-button>
				</div>
			</template>
		</el-dialog>
		<el-dialog title="修正系数" v-model="open1" width="720px" append-to-body>
			<div>
				<p style="text-align: center;">表A.3 修正系数γ<sub>1</sub></p>
				<el-row style="margin-top: 10px;">
					<el-col>
						<el-form ref="correctionFactorRef" :model="correctionFactorForm" :rules="rules" label-width="0px">
							<table align="center" style="width: 100%;border-collapse: collapse;">
								<tr style="background: #D9D9D9;height: 35px;">
									<td align="center" style="width: 150px;">经济发展水平</td>
									<td align="center" style="width: 200px;">
										<el-radio v-model="correctionFactorForm.factorType1" label="1"
											@change="handleCheckedChange1"><span>发达</span></el-radio>
									</td>
									<td align="center">
										<el-radio v-model="correctionFactorForm.factorType1" label="2"
											@change="handleCheckedChange1"><span>较发达</span></el-radio>
									</td>
									<td align="center">
										<el-radio v-model="correctionFactorForm.factorType1" label="3"
											@change="handleCheckedChange1"><span>一般</span></el-radio>
									</td>
								</tr>
								<tr style="height: 35px;">
									<td align="center">修正系数</td>
									<td align="center">1.3</td>
									<td align="center">1.15</td>
									<td align="center">1.0</td>
								</tr>
								<tr>
									<td align="center">计算值</td>
									<td align="center">
										<el-form-item prop="factor1">
											<el-input v-model="correctionFactorForm.factor1" />
										</el-form-item>
									</td>
									<td align="center">
										<el-form-item prop="factor2">
											<el-input v-model="correctionFactorForm.factor2" />
										</el-form-item>
									</td>
									<td align="center">
										<el-form-item prop="factor3">
											<el-input v-model="correctionFactorForm.factor3" />
										</el-form-item>
									</td>
								</tr>
								<tr style="height: 70px;">
									<td align="center" :colspan="4">注:经济发展水平的划分标准根据国家统计局规定，以“人均GDP”指标，分为三个等级:发达(≥30 000 元)，较发达(15 000 元~30
										000 元),一般(≤15 000 元)。</td>
								</tr>
							</table>
							<p style="text-align: center;">表A.4 修正系数γ<sub>2</sub></p>
							<table align="center" style="width: 100%;border-collapse: collapse;">
								<tr style="background: #D9D9D9;height: 35px;">
									<td align="center" style="width: 150px;">用途</td>
									<td align="center" style="width: 200px;">
										<el-radio v-model="correctionFactorForm.factorType2" label="4"
											@change="handleCheckedChange2"><span>住宅</span></el-radio>
									</td>
									<td align="center">
										<el-radio v-model="correctionFactorForm.factorType2" label="5"
											@change="handleCheckedChange2"><span>教育卫生</span></el-radio>
									</td>
									<td align="center">
										<el-radio v-model="correctionFactorForm.factorType2" label="6"
											@change="handleCheckedChange2"><span>公共</span></el-radio>
									</td>
								</tr>
								<tr style="height: 35px;">
									<td align="center">修正系数</td>
									<td align="center">1.0~1.1</td>
									<td align="center">0.8~1.0</td>
									<td align="center">1.1~1.2</td>
								</tr>
								<tr>
									<td align="center">计算值</td>
									<td align="center">
										<el-form-item prop="factor4">
											<el-input v-model="correctionFactorForm.factor4" />
										</el-form-item>
									</td>
									<td align="center">
										<el-form-item prop="factor5">
											<el-input v-model="correctionFactorForm.factor5" />
										</el-form-item>
									</td>
									<td align="center">
										<el-form-item prop="factor6">
											<el-input v-model="correctionFactorForm.factor6" />
										</el-form-item>
									</td>
								</tr>

							</table>
						</el-form>
					</el-col>
				</el-row>
			</div>
			<template #footer>
				<div class="dialog-footer">
					<el-button type="primary" @click="updateFactor">修 改</el-button>
					<el-button @click="open1 = false">关 闭</el-button>
				</div>
			</template>
		</el-dialog>
	</div>
</template>

<script setup name="decorationDirectEconomicLosses">
import useEventStore from "@/store/modules/event";
import {
	houseFinishEconomicLossCount,isHouseFinishEconomicLossCount, getHouseFinishEconomicLossByXsemId, getCorrectionFactorByXsemId,
	saveCorrectionFactor, updateCorrectionFactor, disasterAreaHouseFinishEconomicLossCount
} from "@/api/directLossAssess/decorationDirectEconomicLosses.js"
import { getMhFinishHouseByXstmId, updateMhFinishHouseArea } from "@/api/directLossAssess/decorationTotalArea.js"

const {
	proxy
} = getCurrentInstance();
const dataList = ref([]);
const dataList1 = ref([]);
const loading = ref(false);
const loading1 = ref(false);
const open = ref(false);
const open1 = ref(false);
const currentEvent = computed(() => useEventStore().currentEvent);
const validator26_48 = (rule, value, callback) => {
	value = String(value)
	if (isNaN(value) || !value) {
		return callback(new Error());
	}
	if (!(value <= 48 && value >= 26)) {
		callback(new Error());
	} else {
		callback();
	}
}
const validator20_34 = (rule, value, callback) => {
	value = String(value)
	if (isNaN(value) || !value) {
		return callback(new Error());
	}
	if (!(value <= 34 && value >= 20)) {
		callback(new Error());
	} else {
		callback();
	}
}
const validator19_38 = (rule, value, callback) => {
	value = String(value)
	if (isNaN(value) || !value) {
		return callback(new Error());
	}
	if (!(value <= 38 && value >= 19)) {
		callback(new Error());
	} else {
		callback();
	}
}
const validator16_25 = (rule, value, callback) => {
	value = String(value)
	if (isNaN(value) || !value) {
		return callback(new Error());
	}
	if (!(value <= 25 && value >= 16)) {
		callback(new Error());
	} else {
		callback();
	}
}
const validator15_30 = (rule, value, callback) => {
	value = String(value)
	if (isNaN(value) || !value) {
		return callback(new Error());
	}
	if (!(value <= 30 && value >= 15)) {
		callback(new Error());
	} else {
		callback();
	}
}
const validator10_20 = (rule, value, callback) => {
	value = String(value)
	if (isNaN(value) || !value) {
		return callback(new Error());
	}
	if (!(value <= 20 && value >= 10)) {
		callback(new Error());
	} else {
		callback();
	}
}
const data = reactive({
	queryParams: {
		xstmId: undefined,
	},
	form: {
		bigCityConcreteValue: "37",
		bigCityMasonryValue: "27",
		mediumCityConcreteValue: "29",
		mediumCityMasonryValue: "21",
		smallCityConcreteValue: "23",
		smallCityMasonryValue: "15",
	},
	correctionFactorForm: {},
	rules: {
		bigCityConcreteValue: [{
			required: true,
			message: errormessage26_48,
			trigger: "blur",
			validator: validator26_48
		}],
		bigCityMasonryValue: [{
			required: true,
			message: errormessage20_34,
			trigger: "blur",
			validator: validator20_34
		}],
		mediumCityConcreteValue: [{
			required: true,
			message: errormessage19_38,
			trigger: "blur",
			validator: validator19_38
		}],
		mediumCityMasonryValue: [{
			required: true,
			message: errormessage16_25,
			trigger: "blur",
			validator: validator16_25
		}],
		smallCityConcreteValue: [{
			required: true,
			message: errormessage15_30,
			trigger: "blur",
			validator: validator15_30
		}],
		smallCityMasonryValue: [{
			required: true,
			message: errormessage10_20,
			trigger: "blur",
			validator: validator10_20
		}],

	}
})
const {
	queryParams,
	form,
	correctionFactorForm,
	rules
} = toRefs(data)
function errormessage26_48() {
	proxy.$modal.msgWarning("请输入范围26~48之间的值");
}
function errormessage20_34() {
	proxy.$modal.msgWarning("请输入范围20~34之间的值");
}
function errormessage19_38() {
	proxy.$modal.msgWarning("请输入范围19~38之间的值");
}
function errormessage16_25() {
	proxy.$modal.msgWarning("请输入范围16~25之间的值");
}
function errormessage15_30() {
	proxy.$modal.msgWarning("请输入范围15~30之间的值");
}
function errormessage10_20() {
	proxy.$modal.msgWarning("请输入范围10~20之间的值");
}

// 查询确定房屋装修费用与主体造价的比值
function getMhFinishHouseByXstmIdData() {
	getMhFinishHouseByXstmId(currentEvent.value.id, '1').then(response => {
		if (response.data) {
			form.value = response.data;
			const { bigCityConcreteValue, bigCityMasonryValue, mediumCityConcreteValue, mediumCityMasonryValue, smallCityConcreteValue, smallCityMasonryValue } = response.data
			form.value.bigCityConcreteValue = bigCityConcreteValue || "37";
			form.value.bigCityMasonryValue = bigCityMasonryValue || "27";
			form.value.mediumCityConcreteValue = mediumCityConcreteValue || "29";
			form.value.mediumCityMasonryValue = mediumCityMasonryValue || "21";
			form.value.smallCityConcreteValue = smallCityConcreteValue || "23";
			form.value.smallCityMasonryValue = smallCityMasonryValue || "15";
		}
	});
}

// 修改
function handleUpdate() {
	form.value.xsemId = currentEvent.value.id;
	if (form.value.ratioType == "0") {
		form.value.value1 = form.value.bigCityConcreteValue;
		form.value.value2 = form.value.bigCityMasonryValue;
	} else if (form.value.ratioType == "1") {
		form.value.value1 = form.value.mediumCityConcreteValue;
		form.value.value2 = form.value.mediumCityMasonryValue;
	} else if (form.value.ratioType == "2") {
		form.value.value1 = form.value.smallCityConcreteValue;
		form.value.value2 = form.value.smallCityMasonryValue;
	}

	form.value.type = "1";
	updateMhFinishHouseArea(form.value).then(res => {
		proxy.$modal.msgSuccess("修改成功");
	})
}

// 计算
function handleQuery() {
	if (!form.value.ratioType) {
		proxy.$modal.msgWarning("请选择城市规模");
		return
	}
	loading.value = true;
	const params = {
		xsemId: currentEvent.value.id,
		concreteValue: concreteValue.value,
		masonryValue: masonryValue.value,
		ratioType: form.value.ratioType
	}
	isHouseFinishEconomicLossCount({ratioType: form.value.ratioType}).then(res=>{
		if(res.message==''){
			houseFinishEconomicLossCount(params).then(response => {
				proxy.$modal.msgSuccess(response.message);
				getHouseFinishEconomicLossByXsemIdData(queryParams.value.xstmId);
				loading.value = false
			}).catch(err=>{loading.value = false});
		}else{
			proxy.$modal
			.confirm(res.message, )
			.then(function() {
				return houseFinishEconomicLossCount(params);
			})
			.then((response) => {
				proxy.$modal.msgSuccess(response.message);
				getHouseFinishEconomicLossByXsemIdData(queryParams.value.xstmId);
				loading.value = false
			})
			.catch(() => {loading.value = false});
		}
	})
	return
	
}

// 查询计算列表
function getHouseFinishEconomicLossByXsemIdData() {
	loading.value = true;
	getHouseFinishEconomicLossByXsemId(currentEvent.value.id, '0').then(response => {
		dataList.value = response.data ? response.data : [];
		form.value.ratioType = dataList.value[0]?.ratioType
		handleCheckedCitiesChange(form.value.ratioType)
		loading.value = false;
	}).catch(err=>{loading.value = false});
}

const concreteValue = ref("");
const masonryValue = ref("");
function handleCheckedCitiesChange(value) {
	if (value == "0") {
		concreteValue.value = form.value.bigCityConcreteValue;
		masonryValue.value = form.value.bigCityMasonryValue;
	} else if (value == "1") {
		concreteValue.value = form.value.mediumCityConcreteValue;
		masonryValue.value = form.value.mediumCityMasonryValue;
	} else if (value == "2") {
		concreteValue.value = form.value.smallCityConcreteValue;
		masonryValue.value = form.value.smallCityMasonryValue;
	}
}

// 查看计算公式
function viewFormula() {
	open.value = true;
}

// 查看修正系数
async function viewCorrectionFactor() {
	open1.value = true;
	let response = await getCorrectionFactorByXsemId(currentEvent.value.id)
	correctionFactorForm.value = response.data || {};
	if (!correctionFactorForm.value.xsemId) {
		let data = {
			xsemId: currentEvent.value.id,
			factor1: 1.3,
			factor2: 1.15,
			factor3: 1.0,
			factor4: 1.05,
			factor5: 0.9,
			factor6: 1.15,
		}
		await saveCorrectionFactor(data)
		correctionFactorForm.value = data
	}
}

// 修改修正系数
function updateFactor() {
	updateCorrectionFactor(correctionFactorForm.value).then(res => {
		proxy.$modal.msgSuccess(res.message)
		open1.value = false
	})
}

// 查询汇总列表
const getSummary = () => {
	loading1.value = true
	getHouseFinishEconomicLossByXsemId(currentEvent.value.id, '1').then(response => {
		loading1.value = false
		dataList1.value = response.data
	}).catch(err=>{loading1.value = false});
}

// 汇总
async function summary() {
	if (dataList.value.length == 0) {
		proxy.$modal.msgWarning('请先计算各个评估子区房屋装修直接经济损失！')
		return
	}
	let res = await getCorrectionFactorByXsemId(currentEvent.value.id)
	correctionFactorForm.value = res.data || {};
	if (!correctionFactorForm.value.factorType1 || !correctionFactorForm.value.factorType2) {
		proxy.$modal.msgWarning('请先选择修正系数！')
		return
	}

	let response = await disasterAreaHouseFinishEconomicLossCount({
		xsemId: currentEvent.value.id,
		economicCoefficient: String(correctionFactorForm.value['factor' + correctionFactorForm.value.factorType1]),
		usageCoefficient: String(correctionFactorForm.value['factor' + correctionFactorForm.value.factorType2])
	})
	proxy.$modal.msgSuccess(response.message)
	getSummary()
}

function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
	if (columnIndex === 0) {
		const _row = setTable(dataList.value).one[rowIndex];
		const _col = _row > 0 ? 1 : 0;
		return {
			rowspan: _row,
			colspan: _col
		};
	}
}
function setTable(tableData) {
	let spanOneArr = [],
		spanTwoArr = [],
		spanThreeArr = [],
		spanFourArr = [],
		concatOne = 0,
		concatTwo = 0,
		concatThree = 0,
		concatFour = 0;
	tableData.forEach((item, index) => {
		if (index === 0) {
			spanOneArr.push(1);
			spanTwoArr.push(1);
			spanThreeArr.push(1);
			spanFourArr.push(1);
		} else {
			if (item.xstmName === tableData[index - 1].xstmName) {
				//第一列需合并相同内容的判断条件
				spanOneArr[concatOne] += 1;
				spanOneArr.push(0);
			} else {
				spanOneArr.push(1);
				concatOne = index;
			}
		}
	});
	return {
		one: spanOneArr,
		two: spanTwoArr,
		three: spanThreeArr,
		four: spanFourArr,
	};
}
function handleCheckedChange1(value) {

}
function handleCheckedChange2(value) {

}
watch(() => currentEvent.value, async () => {
	if (currentEvent.value?.id) {
		await getMhFinishHouseByXstmIdData()
		getHouseFinishEconomicLossByXsemIdData()
		getSummary()
	}
}, { immediate: true })
</script>

<style scoped lang="scss">
.title {
	margin: 0 0 20px !important;
}

table td {
	border: 1px solid #c6c6c6;
}

:deep(table .el-form-item--default) {
	margin-bottom: 0px !important;
}

:deep(.el-form-item__error) {
	display: none !important;
}

:deep(.el-input__inner) {
	text-align: center !important;
}
</style>